package day6;

import day1.Dog;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class ObjRead {
    public static void main(String[] args) {
        try {
            ObjectInputStream oin=new ObjectInputStream(new FileInputStream("F:/java76/obj.txt"));
            Dog o = (Dog)oin.readObject();
            oin.close();
            System.out.println(o.getName()+","+o.getBrain()+","+o.getHealth()+","+o.getLove());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
